package com.kexio.gen.domain.entity;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.kexio.gen.config.JsonStringDeserializer;
import com.kexio.gen.config.JsonStringSerializer;

@TableName("gen_table")
public class GenTable {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String tableName;
    private String moduleName;
    private String entityName;
    private String basePackage;
    private String comment;

    private Boolean tenantEnabled;
    private String logicDeleteCol;

    @TableField("audit_cols")
    @JsonSerialize(using = JsonStringSerializer.class)
    @JsonDeserialize(using = JsonStringDeserializer.class)
    private String auditCols; // JSON字符串，API返回时自动转为JSON对象

    private String permissionPrefix;
    private String parentMenuId; // 父菜单ID，用于生成菜单时指定上级菜单

    private Boolean frontendEnabled;
    private Boolean overwriteEnabled;
    private String outputDir;

    private String templateType; // single | multi

    private String mapperXmlSingleTpl;
    private String mapperXmlJoinTpl;

    @TableField("query_defs")
    @JsonSerialize(using = JsonStringSerializer.class)
    @JsonDeserialize(using = JsonStringDeserializer.class)
    private String queryDefs; // JSON字符串，API返回时自动转为JSON对象

    @TableField("ext")
    @JsonSerialize(using = JsonStringSerializer.class)
    @JsonDeserialize(using = JsonStringDeserializer.class)
    private String ext; // JSON字符串，API返回时自动转为JSON对象

    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getTableName() { return tableName; }
    public void setTableName(String tableName) { this.tableName = tableName; }
    public String getModuleName() { return moduleName; }
    public void setModuleName(String moduleName) { this.moduleName = moduleName; }
    public String getEntityName() { return entityName; }
    public void setEntityName(String entityName) { this.entityName = entityName; }
    public String getBasePackage() { return basePackage; }
    public void setBasePackage(String basePackage) { this.basePackage = basePackage; }
    public String getComment() { return comment; }
    public void setComment(String comment) { this.comment = comment; }
    public Boolean getTenantEnabled() { return tenantEnabled; }
    public void setTenantEnabled(Boolean tenantEnabled) { this.tenantEnabled = tenantEnabled; }
    public String getLogicDeleteCol() { return logicDeleteCol; }
    public void setLogicDeleteCol(String logicDeleteCol) { this.logicDeleteCol = logicDeleteCol; }
    public String getAuditCols() { return auditCols; }
    public void setAuditCols(String auditCols) { this.auditCols = auditCols; }
    public String getPermissionPrefix() { return permissionPrefix; }
    public void setPermissionPrefix(String permissionPrefix) { this.permissionPrefix = permissionPrefix; }
    public String getParentMenuId() { return parentMenuId; }
    public void setParentMenuId(String parentMenuId) { this.parentMenuId = parentMenuId; }
    public Boolean getFrontendEnabled() { return frontendEnabled; }
    public void setFrontendEnabled(Boolean frontendEnabled) { this.frontendEnabled = frontendEnabled; }
    public Boolean getOverwriteEnabled() { return overwriteEnabled; }
    public void setOverwriteEnabled(Boolean overwriteEnabled) { this.overwriteEnabled = overwriteEnabled; }
    public String getOutputDir() { return outputDir; }
    public void setOutputDir(String outputDir) { this.outputDir = outputDir; }
    public String getTemplateType() { return templateType; }
    public void setTemplateType(String templateType) { this.templateType = templateType; }
    public String getMapperXmlSingleTpl() { return mapperXmlSingleTpl; }
    public void setMapperXmlSingleTpl(String mapperXmlSingleTpl) { this.mapperXmlSingleTpl = mapperXmlSingleTpl; }
    public String getMapperXmlJoinTpl() { return mapperXmlJoinTpl; }
    public void setMapperXmlJoinTpl(String mapperXmlJoinTpl) { this.mapperXmlJoinTpl = mapperXmlJoinTpl; }
    public String getQueryDefs() { return queryDefs; }
    public void setQueryDefs(String queryDefs) { this.queryDefs = queryDefs; }
    public String getExt() { return ext; }
    public void setExt(String ext) { this.ext = ext; }
    public LocalDateTime getCreatedAt() { return createdAt; }
    public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
    public LocalDateTime getUpdatedAt() { return updatedAt; }
    public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
}


